#ifndef	_APP_H_
#define	_APP_H_

#include "main.h"
#include "MS51_16K.h"

//#define	UART0

#define 	SEG_A			P10
#define 	SEG_B			P11
#define 	SEG_C			P07
#define 	SEG_D			P03
#define 	SEG_E			P30
#define 	SEG_F			P00
#define 	SEG_G			P01
#define 	SEG_DOT			P17
#define 	SEAT_A1			P12
#define 	SEAT_A2			P04
#define 	WATER_A1		P13
#define 	WATER_A2		P05
#define 	MODEL_A			P14

#define 	IRMain_Pin			P20
#define 	IR_Foot_Pin			P15
#define		IR_BIT1_EFFECT_CNT		4
#define		IR_BIT1_MAX_CNT			6

#define		FOOT_LONG_EFFECT_CNT		150
#define		FOOT_SHORT_EFFECT_CNT		75

void MODIFY_HIRC_16(void);
void MODIFY_HIRC_24(void);
void WDT_Reset_Init(void);
void SegDisplay(u8 Num);
void SegScan(void);
void Uart_Rxd_Handle(void);
void Uart_Txd_Handle(void);
void Uart0_Send(u8 *Sp,u8 Byte);
void Uart1_Send(u8 *Sp,u8 Byte);
void Uart_Error_Handle(void);
void IR_Handle(void);
void IR_Service(void);
void IROverTimeHandle(void);
void Ad_Service(void);
#endif

